package com.wish.g01.finance.controller;

import java.util.List;

import com.wish.g01.base.dto.CwPayOrderDto;
import com.wish.g01.base.entity.CwPayOrder;
import com.wish.g01.base.service.ICwPayOrderService;
import com.wish.g01.common.core.web.controller.BaseController;
import com.wish.g01.common.core.web.page.TableDataInfo;
import com.wish.g01.common.security.annotation.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 支付订单（支付流水信息）Controller
 * 
 * @author wish
 * @date 2022-05-27
 */
@RestController
@RequestMapping("/order")
public class TCwPayOrderController extends BaseController
{
    @Autowired
    ICwPayOrderService cwPayOrderService;

    /**
     * 查询支付订单（支付流水信息）列表
     */
    @PreAuthorize(hasPermi = "system:order:list")
    @GetMapping("/list")
    public TableDataInfo list(CwPayOrderDto dto)
    {
        startPage();
        List<CwPayOrder> list = cwPayOrderService.listAll(dto);
        return getDataTable(list);
    }

//    /**
//     * 导出支付订单（支付流水信息）列表
//     */
//    @PreAuthorize(hasPermi = "system:order:export")
//    @Log(title = "支付订单（支付流水信息）", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, TCwPayOrder tCwPayOrder) throws IOException
//    {
//        List<TCwPayOrder> list = tCwPayOrderService.selectTCwPayOrderList(tCwPayOrder);
//        ExcelUtil<TCwPayOrder> util = new ExcelUtil<TCwPayOrder>(TCwPayOrder.class);
//        util.exportExcel(response, list, "order");
//    }
//
//    /**
//     * 获取支付订单（支付流水信息）详细信息
//     */
//    @PreAuthorize(hasPermi = "system:order:query")
//    @GetMapping(value = "/{id}")
//    public AjaxResult getInfo(@PathVariable("id") Long id)
//    {
//        return AjaxResult.success(tCwPayOrderService.selectTCwPayOrderById(id));
//    }
//
//    /**
//     * 新增支付订单（支付流水信息）
//     */
//    @PreAuthorize(hasPermi = "system:order:add")
//    @Log(title = "支付订单（支付流水信息）", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody TCwPayOrder tCwPayOrder)
//    {
//        return toAjax(tCwPayOrderService.insertTCwPayOrder(tCwPayOrder));
//    }
//
//    /**
//     * 修改支付订单（支付流水信息）
//     */
//    @PreAuthorize(hasPermi = "system:order:edit")
//    @Log(title = "支付订单（支付流水信息）", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody TCwPayOrder tCwPayOrder)
//    {
//        return toAjax(tCwPayOrderService.updateTCwPayOrder(tCwPayOrder));
//    }
//
//    /**
//     * 删除支付订单（支付流水信息）
//     */
//    @PreAuthorize(hasPermi = "system:order:remove")
//    @Log(title = "支付订单（支付流水信息）", businessType = BusinessType.DELETE)
//	@DeleteMapping("/{ids}")
//    public AjaxResult remove(@PathVariable Long[] ids)
//    {
//        return toAjax(tCwPayOrderService.deleteTCwPayOrderByIds(ids));
//    }
}
